<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStMedicalNumberTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('st_medical_number', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('hospital_id')->default(0)->comment('医院id');
            $table->integer('patient_id')->default(0)->comment('病人id');
            $table->string('medical_number', 32)->nullable()->comment('病案号');

            $table->timestamp('created_at')->useCurrent()->comment('生成时间');
            $table->timestamp('updated_at')->useCurrent()->comment('更新时间');

            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
